<?php
require 'basehandle.php';
require '../dao/userdao.php';

class Changepwd implements basehandle{
	public function dohandle(){
		$repsw=$_POST['repsw'];
		$psw=$_POST['psw'];
		$uname=$_POST['uname'];
		$dao=new userdao();
 		$rs=$dao->changepwd($repsw,$psw,$uname);
 		error_log($rs);
		if($rs==1){	
			$info=array("rs"=>"success");
		}
		else{
			$info=array("rs"=>"error","errorinf"=>"失败");
		}
		echo json_encode($info);
	}
	
}  
?>